﻿<%@ Page Title="" Language="C#" MasterPageFile="~/NewStdMasterPage.Master" AutoEventWireup="true"
    CodeBehind="BookDetails.aspx.cs" Inherits="AteneoLibri.BookDetails" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<%--    <script language="javascript" type="text/javascript">
        function ContactUser() {
            window.location.href = "../BackEnd/ManageUsers.aspx";
        }
    </script>--%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        <asp:Label ID="lblTitle" runat="server"></asp:Label>
    </h2>
    <!-- BUTTONS THAT PERMIT TO MOVE THROUGHT THE COLLECTION -->
    <%--<asp:Panel ID="pnlButtonsMoveCollection" runat="server" Visible="false">
        <div style="width: 100%; border: 0px blue solid; overflow:auto; ">
            <div style="width:50%; float:left; border: 0px red solid;">
                <asp:Button ID="btnPrevious" runat="server" Text="Prev" 
                    onclick="btnPrevious_Click" />
            </div>
            <div style="width:50%; border: 0px green solid; text-align: right;">
                <asp:Button ID="btnNext" runat="server" Text="Next" onclick="btnNext_Click" />
            </div>
        </div>
    </asp:Panel>--%>
    <!-- PANNELLO VISUALIZZAZIONE DEI DETTAGLI DEL LIBRO -->
    <div class="BookDetail">
        <asp:Panel runat="server" ID="pnlBookDetails" Visible="true">
            <div id="leftRegistration" class="Registration" style="width: 230px;">
                <asp:Image ID="CoverImage" CssClass="NoImage" runat="server" />
            </div>
            <div id="rightRegistration" class="Registration">
                <strong>Autore/i</strong><br />
                <asp:Label ID="lblAuthors" runat="server"></asp:Label><br />
                <strong>Prezzo</strong><br />
                <asp:Label ID="lblSellingPrice" runat="server" Font-Size="1.5em"></asp:Label><br />
                <br />
                <strong>Messo in vendita il</strong><br />
                <asp:Label ID="lblInsertDate" runat="server"></asp:Label><br />
                <strong>Venditore</strong><br />
                <%--<a href='UserDetails.aspx?UserId=<%# Eval("UserId") %>'>
                        <asp:Label ID="lblOwner" runat="server" Text='<%# Bind("Owner") %>'></asp:Label></a>--%>
                <asp:HyperLink ID="lnkUserProfile" runat="server"></asp:HyperLink>
                <%--<asp:Label ID="lblUserName" runat="server"></asp:Label>--%><br />
                <hr />
                <strong>Casa editrice</strong><br />
                <asp:Label ID="lblPublishingHouse" runat="server"></asp:Label><br />
                <strong>Edizione</strong><br />
                <asp:Label ID="lblEdition" runat="server"></asp:Label><br />
                <hr />
                <strong>Note</strong><br />
                <asp:Label ID="lblNote" runat="server"></asp:Label>
            </div>
        </asp:Panel>
    </div>
    <!-- PANNELLO FUNZIONE ACQUISTO DEL LIBRO -->
    <asp:Panel runat="server" ID="pnlBuyBook" Wrap="true">
        <asp:ImageButton ID="btnBuyBook" runat="server" CssClass="metroButton" AlternateText="Acquista il libro"
            ImageUrl="~/Images/buttons/ContactUser_100x100.png" OnClick="btnBuyBook_Click" />
<%--        <div class="MenuButton Next" onclick="ContactUser()">
            <div class="ButtonText">
                Contatta il venditore
            </div>
        </div>--%>
    </asp:Panel>
    <!-- PANNELLO GESTIONE MESSAGGIO INIZIALE DI VENDITA -->
    <asp:Panel runat="server" ID="pnlStartUpMessage" Visible="false">
        <asp:Label ID="Label12" runat="server" Text="Contatta il venditore"></asp:Label>
        <br />
        <asp:TextBox runat="server" ID="txtStartUpMessage" CssClass="StandardTextBox" TextMode="MultiLine"
            Width="95%" Rows="6"></asp:TextBox>
        <br />
        <div style="text-align: center; padding-top: 10px;">
            <asp:Button runat="server" ID="btnInviaRichiesta" CssClass="StandardButton" Text="Invia richiesta"
                OnClick="btnInviaRichiesta_Click" />&nbsp;&nbsp;
            <asp:Button runat="server" ID="btnAnnulla" CssClass="StandardButton" Text="Annulla"
                OnClick="btnAnnulla_Click" />
        </div>
    </asp:Panel>
    <!-- PANNELLO GESTIONE COMANDI PER UTENTE LOGGATO (MODIFICA - METTI A VENDUTO - CANCELLA) -->
    <asp:Panel runat="server" ID="pnlManageActivity" Visible="false">
        <asp:ImageButton ID="btnModifyBook" runat="server" CssClass="metroButton" AlternateText="Modifica dettagli libro"
            ImageUrl="~/Images/buttons/ModifyBookButton.Next.100x100.png" OnClick="btnModifyBook_Click" />
        <%--<asp:ImageButton ID="btnSoldBook" runat="server" CssClass="metroButton" AlternateText="Setta lo stato del libro a venduto"
            ImageUrl="~/Images/buttons/SoldBookButton.Check.194x100.png" OnClick="btnSoldBook_Click" />--%>
        <asp:ImageButton ID="btnRemoveBook" runat="server" CssClass="metroButton" AlternateText="Rimuovi libro dalla biblioteca personale"
            ImageUrl="~/Images/buttons/RemoveBookButton.Delete.194x100.png" OnClick="btnRemoveBook_Click" OnClientClick="if(confirm('Sei sicuro di voler cancellare il libro?')){return true}else{return false;}" />
    </asp:Panel>
    <!-- PANNELLI ERROR, WARNING, SUCCESS -->
    <asp:Panel runat="server" ID="pnlWarning" Visible="false">
        <table>
            <tr>
                <td>
                    <asp:Image ID="imgWarning" runat="server" ImageUrl="~/Images/icon-success.png" />
                </td>
                <td style="vertical-align: middle; padding-left: 20px;">
                    <asp:Label ID="lblWarning" runat="server" CssClass="failureNotification" Font-Size="Larger"></asp:Label>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel runat="server" ID="pnlSuccess" Visible="false">
        <table>
            <tr>
                <td>
                    <asp:Image ID="imgSuccess" runat="server" ImageUrl="~/Images/icon-success.png" />
                </td>
                <td style="vertical-align: middle; padding-left: 20px;">
                    <asp:Label ID="lblSuccess" runat="server" CssClass="failureNotification" ForeColor="Blue" Font-Size="Larger"></asp:Label>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Panel runat="server" ID="pnlError" Visible="false">
        <table>
            <tr>
                <td>
                    <asp:Image ID="imgError" runat="server" ImageUrl="~/Images/icon-denied.png" />
                </td>
                <td style="vertical-align: middle; padding-left: 20px;">
                    <asp:Label ID="lblError" runat="server" CssClass="failureNotification" Font-Size="Larger"></asp:Label>
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
